package com.ethink.order.common.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.model.PurchaseOrderModeModel;
import com.ethink.order.api.model.PurchaseOrderModel;
import com.ethink.order.api.request.PurchaseOrderPageQueryModeRequest;
import com.ethink.order.api.request.PurchaseOrderPageQueryRequest;
import com.ethink.order.api.request.PurchaseOrderUpdateRequest;
import com.ethink.order.common.entity.PurchaseOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 采购单 Mapper接口
 *
 * @author default
 * @date 2022-10-31
 */
@Mapper
public interface PurchaseOrderMapper extends MyBaseMapper<PurchaseOrder> {
    Page<PurchaseOrderModel> purchaseOrderPageQuery(Page buildPage, @Param("request") PurchaseOrderPageQueryRequest request);

    void purchaseOrderUpdate(@Param("request") PurchaseOrderUpdateRequest request);

    String getSaleSubChannelName(@Param("saleSubChannel") String saleSubChannel);

    /**
     * 采购订单货品模式分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<PurchaseOrderModeModel> purchaseOrderPageModeQuery(Page buildPage, @Param("request") PurchaseOrderPageQueryModeRequest request);

    /**
     * 分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    //Page<PurchaseOrderInfo> queryPurchaseOrder(Page buildPage, @Param("request") PurchaseOrderQueryRequest request);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    //PurchaseOrderInfo getPurchaseOrderById(@Param("id") Long id);

    /**
     * 列表查询
     *
     * @param request
     * @return
     */
    //List<PurchaseOrderInfo> listPurchaseOrder(@Param("request") PurchaseOrderQueryRequest request);

}